package assignment;

import java.io.Serializable;
import java.util.ArrayList;

public class Item implements Serializable{
	private String id;
	private String title;
	private String subject;
	private ArrayList<String> type = new ArrayList<String>(3);
	private ArrayList<String> material = new ArrayList<String>(4);
	
	public Item(){
		
	}
	public Item(String id, String title, String subject){
		this.id=id;
		this.title=title;
		this.subject=subject;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	public String getId() {
		return id;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getTitle() {
		return title;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getSubject() {
		return subject;
	}
	public void addType(String type) {
		this.type.add(type);
	}
	public void setType(ArrayList<String> type) {
		this.type = type;
	}
	public ArrayList<String> getType() {
		return type;
	}
	public void addMaterial(String material) {
		this.material.add(material);
	}
	public void setMaterial(ArrayList<String> material) {
		this.material = material;
	}
	public ArrayList<String> getMaterial() {
		return this.material;
	}
	public String toString(){
		return title+subject;
	}
	public boolean equals(Object i){
		if(((Item)i).getId().equals(this.getId()))
			return true;
		return false;
		
	}
}
